package com.sgb.kjwl.view.ui.adapter.price;

import android.content.Context;
import android.widget.TextView;

import com.sgb.kjwl.BR;
import com.sgb.kjwl.R;
import com.sgb.kjwl.model.entity.TeamPriceItemEntity;
import com.swgk.core.recyclerview.adapter.BaseRecycleAdapter;
import com.swgk.core.recyclerview.adapter.ItemViewHolder;
import com.swgk.core.util.DateUtils;

import java.util.List;

public class QuotePriceListAdapter extends BaseRecycleAdapter<TeamPriceItemEntity> {

    public QuotePriceListAdapter(Context context, List<TeamPriceItemEntity> data) {
        super(context, R.layout.item_quote_list, data);
    }


    @Override
    public void convert(ItemViewHolder holder, TeamPriceItemEntity teamPriceItemEntity) {
        holder.setBinding(BR.viewModel, teamPriceItemEntity);
        TextView tvTime = holder.itemView.findViewById(R.id.tv_time);
        tvTime.setText(String.format("%s 发布", DateUtils.timestampToDate(teamPriceItemEntity.getCreateTime())));
    }
}
